B-Tree code

Hi,

Do you have a source code about B-Tree(written in Xojo) you can share?

Thanks.
Changwon.

What are you trying to accomplish?

I’m trying to discover all of server nodes and each node(server) can just be a target of the source node OR it can be a source of other target servers. So, I thought I could implement this traverse logic by using B-Tree algorithm.

Thanks for your consideration.

Added:
When I visit the server, I’m able to check if the server has another target or it is just a end point.

Why don’t you just use a SQLite instance (in memory?) to store your node indexes and the node relations (maybe even more data if you wish).

Actually I’m using SQLite & Array structure for storing the checked nodes but failed to make it harder. That’s why I’m looking for the proven algorithm for now.
I’m not good at implementing that logic. Very freshman in programming…-.-

I believe that you need to do a bit more “pencil and paper” work, designing your logic, than starting programing it right away without having it very clear. I don’t know EXACTLY what you are trying to accomplish but it seems very likable that it’s easier to accomplish using some not very hard logic using SQLite, than building a B-Tree engine, and later finding that you still can’t handle the problem very well. :wink: Think -> design -> develop. :wink:

Good advice,
I will try that again with many pencils. ^.

Thanks.

Changwon lee,

I recommend reading the Breadth First search Algorithm. I have implemented a “portion” of this and overall is similar to how I understand what you are looking for. I designed a similar type of architecture using network devices vs. servers, but same concept.

http://en.wikipedia.org/wiki/Breadth-first_search

HTH,
Mike

Well, you know the old one-liner:

Analyst to programmer: “You start coding. I’ll go find out what they want.”

:wink:

We don’t use this adagio by here. But we usually put new interns to move black boxes of unstable quantum bits to other departments, and they must be very careful, due to the possibility spilling the internal sensitive information.