Information about bees and map funciton

52 views
Skip to first unread message

Shiva Ketabi

unread,
Feb 17, 2015, 3:50:37 PM2/17/15
to beehi...@googlegroups.com
Hi
Would you please explain how can we get information about active bees, their numbers, allocated cells, message passing, etc?
Also I'll be thankful if you briefly talk about what we should include in the map function?
Best regards,
Shiva

Soheil Hassas Yeganeh

unread,
Feb 17, 2015, 9:59:30 PM2/17/15
to Shiva Ketabi, beehi...@googlegroups.com
Hi Shiva,

> Would you please explain how can we get information about active bees, their
> numbers, allocated cells, message passing, etc?

You can use the "/api/v1/bees" and "/api/v1/state" endpoints to get
the state of hives. For message passing stats, you can use
"/apps/bh_collector/stats" endpoint. This endpoint is exposed by the
instrumentation module which is disabled by default. To turn it on,
you should pass "-instrument" as a cmd argument. I can expose more
data, should you need anything else.

> Also I'll be thankful if you briefly talk about what we should include in
> the map function?

Think of the map function as a tool to partition/serialize your
application's messages. It should return the keys you access in your
recv function, but that really depends on the application. For
example:
- it is valid to return {"D", "0"} for all application. Your
application becomes effectively centralized.
- it is valid to return {"D", random number} if your recv function
does not access any dictionary.
....

Best,
Soheil

> Best regards,
> Shiva
>
> --
> You received this message because you are subscribed to the Google Groups
> "beehive-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beehive-dev...@googlegroups.com.
> To post to this group, send email to beehi...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beehive-dev/011ea04e-17a3-4a07-9e68-ec3c4bbe7d2e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages