Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 2.18 KB

TODO.org

File metadata and controls

49 lines (40 loc) · 2.18 KB

add mociweb REST interface

Try to make XML compatible with what is used at Evri

add otp application, supervision, logging

understand how to make this HA using multiple Erlang nodes

Implement service expiration

One way might be to use the gb_tree module and add expiration times as services are added. But assuming processes really are cheap as advertised, an interesting and simple first-pass solution is to spawn a process for each service when registered that waits to remove it. It would need to check before removing that the expiry has not been updated. There is also the problem that if the server crashes then these processes don’t have a way to restart. An eventually consistent approach could have a cleaner process that checks for expired processes once a minute, say, in addition to per service cleaners.

benchmark mnesia query, consider adding indices

configure to use disk-based mnesia tables

figure out test fixtures in eunit

implement service removal

Define service record

NameDescriptionTypeDefault
idhash of type, group, and URLstring-
typename of service typestring-
groupgroup namestring””
protoprotocalstring“http”
hosthost namestring-
portport numberint80
pathservice pathstring””
attrskey/value attributeslist of {k, v}[]
expiryexpiration time sec from epochlong0
leaselease time in secondsint300

Name Description id unique id based on hash of service type and URL

Research

Figure out mochiweb

Learn XML parsing, building

Learn JSON parsing, building