Roman Klochkov <email@example.com>
Hive is the framework for a client-server application with persistent object storage on server side.
|(require hive/common)||package: hive-common|
This package provides functions, that will be used both on client and server sides of the hive application.
|(require hive/common/read-write)||package: hive-common|
This library provides read and write for network streams. The connection is unreliable. I know, that TCP is considered reliable, but in fact, when network infrastucture drops part of packets, it may recover too slow. So, Hive uses keepalive packets and tools to control read timeout.
(read/timeout [in timeout]) → any
in : input-port? = (current-input-port)
timeout : (or/c #f (and/c real? (not/c negative?)) (-> any)) = 30
|(require hive/common/serialize)||package: hive-common|
This library provide serializable objects. It differs from racket/serialize in that it doesn’t deep copy of the object. It rather replaces all field values, that references to other objects to special ref structure. This way the library may be used to send object by network or save to file without saving all linked objects.
#:extra-constructor-name make-ref) typename : symbol? id : exact-nonnegative-integer?
id : exact-nonnegative-integer? objects : (listof object?)
> (find-by-ref 2 (list (object 5) (object 6)))
> (find-by-ref 5 (list (object 5) (object 6)))
(struct/serialize name rest ...)
obj : serializable? prepare : (serializable? . -> . serializable?) = identity
|(require hive/common/users)||package: hive-common|
name - user name, any unicode characters allowed;
password - user password;
role - user role. Hive accepts 'admin and 'user, but application may invent it’s own;
online - #t, iff user is logged on and sending keepalive packets.